<template>
  <div class="container">
    <data-view
      :propViewKey="parameters.getHisBillViewKey()"
      propViewForm="dept/his-bill/detail.vue"
      :propFlowKey="propFlowKey"
      @extra-button-click="extraButtonClick"
    />
  </div>
</template>

<script>

export default {
  name: 'hisbill',
  data() {
    return {

    }
  },
  components: {

  },
  methods: {
    extraButtonClick(para) {
      if (para.button.key == 'refresh-his') {
        this.utilVue.loadShow(true)
        this.$ajax.post('his/refreshBillHis', {billDate: para.userQuery.data.billDate}).then(response => {
          this.utilVue.loadHide()
          if (response.code == 0) {
            this.utilMessage.success('数据同步成功')
            this.$refs.dataView.ocRefresh()
          }
        })
      }
    },
  },
  props: ['propFlowKey'],
}
</script>

<style lang="scss" scoped>
  .container {
    height: 100%;
    background-color: #fff;
  }
</style>
